Optimal. Leaf size=39 \[ \frac{(b c-a d) \tan ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{d}}\right )}{c^{3/2} \sqrt{d}}+\frac{a x}{c} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0200836, antiderivative size = 39, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.176, Rules used = {374, 388, 205} \[ \frac{(b c-a d) \tan ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{d}}\right )}{c^{3/2} \sqrt{d}}+\frac{a x}{c} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 374
Rule 388
Rule 205
Rubi steps
\begin{align*} \int \frac{a+\frac{b}{x^2}}{c+\frac{d}{x^2}} \, dx &=\int \frac{b+a x^2}{d+c x^2} \, dx\\ &=\frac{a x}{c}-\frac{(-b c+a d) \int \frac{1}{d+c x^2} \, dx}{c}\\ &=\frac{a x}{c}+\frac{(b c-a d) \tan ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{d}}\right )}{c^{3/2} \sqrt{d}}\\ \end{align*}
Mathematica [A] time = 0.0256489, size = 40, normalized size = 1.03 \[ \frac{a x}{c}-\frac{(a d-b c) \tan ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{d}}\right )}{c^{3/2} \sqrt{d}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.004, size = 45, normalized size = 1.2 \begin{align*}{\frac{ax}{c}}-{\frac{ad}{c}\arctan \left ({cx{\frac{1}{\sqrt{cd}}}} \right ){\frac{1}{\sqrt{cd}}}}+{b\arctan \left ({cx{\frac{1}{\sqrt{cd}}}} \right ){\frac{1}{\sqrt{cd}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.23323, size = 223, normalized size = 5.72 \begin{align*} \left [\frac{2 \, a c d x +{\left (b c - a d\right )} \sqrt{-c d} \log \left (\frac{c x^{2} + 2 \, \sqrt{-c d} x - d}{c x^{2} + d}\right )}{2 \, c^{2} d}, \frac{a c d x +{\left (b c - a d\right )} \sqrt{c d} \arctan \left (\frac{\sqrt{c d} x}{d}\right )}{c^{2} d}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] time = 0.40391, size = 82, normalized size = 2.1 \begin{align*} \frac{a x}{c} + \frac{\sqrt{- \frac{1}{c^{3} d}} \left (a d - b c\right ) \log{\left (- c d \sqrt{- \frac{1}{c^{3} d}} + x \right )}}{2} - \frac{\sqrt{- \frac{1}{c^{3} d}} \left (a d - b c\right ) \log{\left (c d \sqrt{- \frac{1}{c^{3} d}} + x \right )}}{2} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.13505, size = 45, normalized size = 1.15 \begin{align*} \frac{a x}{c} + \frac{{\left (b c - a d\right )} \arctan \left (\frac{c x}{\sqrt{c d}}\right )}{\sqrt{c d} c} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]